/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pkl53.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author HP G42 (RILLA)
 */
@Entity
@Table(name = "kabupatenkota")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Kabupatenkota.findAll", query = "SELECT k FROM Kabupatenkota k"),
    @NamedQuery(name = "Kabupatenkota.findByB1r1", query = "SELECT k FROM Kabupatenkota k WHERE k.b1r1 = :b1r1"),
    @NamedQuery(name = "Kabupatenkota.findByNamaKabupaten", query = "SELECT k FROM Kabupatenkota k WHERE k.namaKabupaten = :namaKabupaten")})
public class Kabupatenkota implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "B1R1")
    private String b1r1;
    @Basic(optional = false)
    @Column(name = "namaKabupaten")
    private String namaKabupaten;

    public Kabupatenkota() {
    }

    public Kabupatenkota(String b1r1) {
        this.b1r1 = b1r1;
    }

    public Kabupatenkota(String b1r1, String namaKabupaten) {
        this.b1r1 = b1r1;
        this.namaKabupaten = namaKabupaten;
    }

    public String getB1r1() {
        return b1r1;
    }

    public void setB1r1(String b1r1) {
        this.b1r1 = b1r1;
    }

    public String getNamaKabupaten() {
        return namaKabupaten;
    }

    public void setNamaKabupaten(String namaKabupaten) {
        this.namaKabupaten = namaKabupaten;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (b1r1 != null ? b1r1.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Kabupatenkota)) {
            return false;
        }
        Kabupatenkota other = (Kabupatenkota) object;
        if ((this.b1r1 == null && other.b1r1 != null) || (this.b1r1 != null && !this.b1r1.equals(other.b1r1))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pkl53.model.Kabupatenkota[ b1r1=" + b1r1 + " ]";
    }
    
}
